class CreateProducts < ActiveRecord::Migration
  def self.up
    create_table :products do |t|
      t.references :user
      t.references :material
      t.references :style
      t.integer    :fm,:limit=>2
      t.integer    :bm,:limit=>2
      t.integer    :lu,:limit=>2
      t.integer    :frd,:limit=>2
      t.integer    :fld,:limit=>2
      t.integer    :brd,:limit=>2
      t.decimal    :price,:precision => 8, :scale => 2, :default => 0

      t.timestamps
    end
  end

  def self.down
    drop_table :products
  end
end
